<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="format-detection" content="email=no" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <title>自我管理行为</title>
    <!-- 引入 vant UI 组件库样式文件 -->
    <link rel="stylesheet" href="../../../common/css/vant-index.css" />
    <style rel="stylesheet">
        body {
            background-color: #f7f8fa;
        }

        a {
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        }

        a:-webkit-any-link {
            color: #eee;
        }

        .container {
            border: 1px solid #f5f5f5;
            box-shadow: -1px 5px 5px #ececec;
            border-radius: 10px;
            margin: 0.6rem;
            padding: 0;
        }

        .van-cell__title {
            flex: 2;
        }

        #lists {
            margin-top: 0.2rem;
            font-size: 1rem;
            font-weight: 350;
            color: #8c8b8c;
            text-align: left;
        }

        .van-cell-group--inset {
            margin: 0;
        }

        .tab-btn {
            margin: 0.2rem;
            height: 1.7rem;
            line-height: 1.7rem;
        }

        #tabs-title {
            background-color: #11428c;
            display: flex;
        }

        #left-btn {
            flex: 1;
        }

        #right-btn {
            margin-right: 0.5rem;
        }

        /* .van-radio__icon--round .van-icon {
            width: 8rem;
            height: 3rem;
            border-radius: 60px;
            background: rgba(0, 91, 172, 0.1);
            margin: 0.5rem;
        }


        .van-radio-group--horizontal {
            height: 10rem;
            line-height: 5rem;
        } */

        .evalution_value {
            height: 3rem;
            width: 100%;
            background-color: #E22E30;
            text-align: center;
            line-height: 3rem;
            bottom: 0;
            margin-top: 3rem;
            margin-bottom: 0.5rem;
        }

        .van-button::before {
            background-color: red;
        }

        .evalution_button {
            margin: 0.2rem 0.2rem;
        }

        .evalution_button_list {
            margin: 0.2rem 0.2rem;
            width: 45%;
        }

        .bgcolor {
            background-color: #E22E30;
            color: #fff;
        }
		
		.bgcolorred {
		    background-color: #E22E30;
		    color: #fff;
		}
		.bgcolorblue {
		    background-color: #005BAC;
		    color: #fff;
		}
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <van-nav-bar v-if='from!="weapp"' title="自我管理行为" left-text="返回" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
            <template #right>
                <van-icon name="wap-home-o" size='18' />
            </template>
        </van-nav-bar>
        <div class="container" :class="from=='weapp'?'padding-bottom':''">
            <span>1.在过去7天中，您有多少天，按照健康的饮食计划来进食？</span>
            <div class="evalution_button">
                <van-button round class="evalution_button_list" :class="statisticsPeriod==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio1=0,getButtonChange(0)">0天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio1=1,getButtonChange(1)">1天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio1=2,getButtonChange(2)">2天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio1=3,getButtonChange(3)">3天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio1=4,getButtonChange(4)">4天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio1=5,getButtonChange(5)">5天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod==6?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio1=6,getButtonChange(6)">6天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod==7?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio1=7,getButtonChange(7)">7天
                </van-button>
            </div>
            <span>2.在过去7天中，您有多少天，一天所吃的蔬菜水果加起来超过5份（如:吃蔬菜3碟、水果2个）</span>
            <div class="evalution_button">
                <van-button round class="evalution_button_list" :class="statisticsPeriod1==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio2=0,getButtonChange1(0)">0天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod1==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio2=1,getButtonChange1(1)">1天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod1==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio2=2,getButtonChange1(2)">2天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod1==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio2=3,getButtonChange1(3)">3天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod1==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio2=4,getButtonChange1(4)">4天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod1==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio2=5,getButtonChange1(5)">5天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod1==6?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio2=6,getButtonChange1(6)">6天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod1==7?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio2=7,getButtonChange1(7)">7天
                </van-button>
            </div>
            <span>3.在过去7天中，您有多少天吃油脂多的食物（如:油炸食物、肥肉、鸡皮等）？</span>
            <div class="evalution_button">
                <van-button round class="evalution_button_list" :class="statisticsPeriod2==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio3=0,getButtonChange2(0)">0天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod2==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio3=1,getButtonChange2(1)">1天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod2==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio3=2,getButtonChange2(2)">2天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod2==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio3=3,getButtonChange2(3)">3天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod2==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio3=4,getButtonChange2(4)">4天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod2==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio3=5,getButtonChange2(5)">5天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod2==6?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio3=6,getButtonChange2(6)">6天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod2==7?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio3=7,getButtonChange2(7)">7天
                </van-button>
            </div>
            <span>4.在过去 7 天中，您有多少天，有做 30 分钟以上的活动（指身体持续活动超过 30 分钟，包括:走路、做家事）？</span>
            <div class="evalution_button">
                <van-button round class="evalution_button_list" :class="statisticsPeriod3==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio4=0,getButtonChange3(0)">0天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod3==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio4=1,getButtonChange3(1)">1天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod3==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio4=2,getButtonChange3(2)">2天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod3==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio4=3,getButtonChange3(3)">3天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod3==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio4=4,getButtonChange3(4)">4天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod3==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio4=5,getButtonChange3(5)">5天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod3==6?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio4=6,getButtonChange3(6)">6天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod3==7?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio4=7,getButtonChange3(7)">7天
                </van-button>
            </div>
            <span>5.在过去 7 天中，除了工作及做家事以外，您有多少天，有另外拨时间去做运动（如:慢跑、爬山、太极拳、土风舞等）？</span>
            <div class="evalution_button">
                <van-button round class="evalution_button_list" :class="statisticsPeriod4==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio5=0,getButtonChange4(0)">0天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod4==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio5=1,getButtonChange4(1)">1天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod4==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio5=2,getButtonChange4(2)">2天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod4==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio5=3,getButtonChange4(3)">3天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod4==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio5=4,getButtonChange4(4)">4天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod4==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio5=5,getButtonChange4(5)">5天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod4==6?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio5=6,getButtonChange4(6)">6天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod4==7?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio5=7,getButtonChange4(7)">7天
                </van-button>
            </div>
            <span>6.在过去 7 天中，您有多少天，有照医师指示定时定量服用降血糖的药？（医嘱不需服降血糖药者，不用回答此题）</span>
            <div class="evalution_button">
                <van-button round class="evalution_button_list" :class="statisticsPeriod5==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio6=0,getButtonChange5(0)">0天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod5==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio6=1,getButtonChange5(1)">1天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod5==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio6=2,getButtonChange5(2)">2天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod5==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio6=3,getButtonChange5(3)">3天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod5==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio6=4,getButtonChange5(4)">4天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod5==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio6=5,getButtonChange5(5)">5天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod5==6?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio6=6,getButtonChange5(6)">6天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod5==7?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio6=7,getButtonChange5(7)">7天
                </van-button>
            </div>
            <span>7.在过去 7 天中，您有多少天，在家自己（或家人帮忙）量血糖？</span>
            <div class="evalution_button">
                <van-button round class="evalution_button_list" :class="statisticsPeriod6==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio7=0,getButtonChange6(0)">0天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod6==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio7=1,getButtonChange6(1)">1天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod6==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio7=2,getButtonChange6(2)">2天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod6==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio7=3,getButtonChange6(3)">3天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod6==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio7=4,getButtonChange6(4)">4天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod6==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio7=5,getButtonChange6(5)">5天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod6==6?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio7=6,getButtonChange6(6)">6天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod6==7?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio7=7,getButtonChange6(7)">7天
                </van-button>
            </div>
            <span>8.在过去 7 天中，您有多少天，依照医师指示的血糖测量标准次数（例如1天量血糖两次）在家按时自己（或家人帮忙）量血糖？</span>
            <div class="evalution_button">
                <van-button round class="evalution_button_list" :class="statisticsPeriod7==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio8=0,getButtonChange7(0)">0天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod7==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio8=1,getButtonChange7(1)">1天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod7==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio8=2,getButtonChange7(2)">2天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod7==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio8=3,getButtonChange7(3)">3天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod7==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio8=4,getButtonChange7(4)">4天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod7==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio8=5,getButtonChange7(5)">5天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod7==6?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio8=6,getButtonChange7(6)">6天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod7==7?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio8=7,getButtonChange7(7)">7天
                </van-button>
            </div>
            <span>9.在过去 7 天中，您有多少天，检查您的双脚（包括脚趾、脚板与脚底）？</span>
            <div class="evalution_button">
                <van-button round class="evalution_button_list" :class="statisticsPeriod8==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio9=0,getButtonChange8(0)">0天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod8==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio9=1,getButtonChange8(1)">1天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod8==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio9=2,getButtonChange8(2)">2天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod8==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio9=3,getButtonChange8(3)">3天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod8==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio9=4,getButtonChange8(4)">4天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod8==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio9=5,getButtonChange8(5)">5天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod8==6?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio9=6,getButtonChange8(6)">6天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod8==7?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio9=7,getButtonChange8(7)">7天
                </van-button>
            </div>
            <span>10.在过去 7 天中，您有多少天，在穿鞋之前有先检查鞋內的情形（如：鞋內有无小石头，是否平整、有无破损或潮湿等）？</span>
            <div class="evalution_button">
                <van-button round class="evalution_button_list" :class="statisticsPeriod9==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio10=0,getButtonChange9(0)">0天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod9==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio10=1,getButtonChange9(1)">1天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod9==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio10=2,getButtonChange9(2)">2天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod9==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio10=3,getButtonChange9(3)">3天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod9==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio10=4,getButtonChange9(4)">4天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod9==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio10=5,getButtonChange9(5)">5天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod9==6?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio10=6,getButtonChange9(6)">6天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod9==7?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio10=7,getButtonChange9(7)">7天
                </van-button>
            </div>
            <span>11.在过去 7 天中，您有多少天在洗完脚后将脚擦干，并保持脚趾间干燥？</span>
            <div class="evalution_button">
                <van-button round class="evalution_button_list" :class="statisticsPeriod10==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio11=0,getButtonChange10(0)">0天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod10==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio11=1,getButtonChange10(1)">1天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod10==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio11=2,getButtonChange10(2)">2天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod10==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio11=3,getButtonChange10(3)">3天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod10==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio11=4,getButtonChange10(4)">4天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod10==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio11=5,getButtonChange10(5)">5天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod10==6?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio11=6,getButtonChange10(6)">6天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod10==7?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio11=7,getButtonChange10(7)">7天
                </van-button>
            </div>
            <span>12.在过去 7 天中，您有多少天在出门时，都有穿合适的鞋子（例如没有穿露脚趾的拖鞋或凉鞋而穿包鞋）？</span>
            <div class="evalution_button">
                <van-button round class="evalution_button_list" :class="statisticsPeriod11==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio12=0,getButtonChange11(0)">0天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod11==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio12=1,getButtonChange11(1)">1天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod11==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio12=2,getButtonChange11(2)">2天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod11==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio12=3,getButtonChange11(3)">3天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod11==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio12=4,getButtonChange11(4)">4天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod11==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio12=5,getButtonChange11(5)">5天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod11==6?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio12=6,getButtonChange11(6)">6天
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod11==7?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio12=7,getButtonChange11(7)">7天
                </van-button>
            </div>
			<div class="evalution_value" @click="postSdsca" v-if="status==true&&from==''">
			    <span style="color: #f3f3f3;">提交问卷</span>
			</div>
            <div class="evalution_value" style="background-color: #005BAC;" @click="postSdsca" v-if="status==true&&from=='weapp'">
                <span style="color: #f3f3f3;">提交问卷</span>
            </div>


        </div>
    </div>
</body>
<!-- 上线环境用 -->
<script src="../../../common/js/vue.global.prod.js"></script>
<!-- 引入 UI 组件库 -->
<script src="../../../common/js/vant.min.js"></script>
<script src="../../../common/js/url.min.js"></script>
<!-- axios 接口调用 -->
<script src="../../../common/js/axios.min.js"></script>
<script src="../../../base.js"></script>


<script type="module">

    import {
        getAction,
        postAction,
        getUrl,
    } from "../../../common/js/api/vue3-axios-utils.js";
    const PatientData = {
        data() {
            return {
                url: {
                    postSdsca: "/105/01/1050101",
                    getSdscaInfo: "/105/01/1050102",
                },
				from:'',
                currentData: {},
                status: true,
                statisticsPeriod: null,
                statisticsPeriod1: null,
                statisticsPeriod2: null,
                statisticsPeriod3: null,
                statisticsPeriod4: null,
                statisticsPeriod5: null,
                statisticsPeriod6: null,
                statisticsPeriod7: null,
                statisticsPeriod8: null,
                statisticsPeriod9: null,
                statisticsPeriod10: null,
                statisticsPeriod11: null,
                radios: {
                    radio1: null,
                    radio2: null,
                    radio3: null,
                    radio4: null,
                    radio5: null,
                    radio6: null,
                    radio7: null,
                    radio8: null,
                    radio9: null,
                    radio10: null,
                    radio11: null,
                    radio12: null,
                },
				patientId:'',
				from:''
            };
        },


        methods: {

            getButtonChange(value) {
                this.statisticsPeriod = value;
            },
            getButtonChange1(value) {
                this.statisticsPeriod1 = value;
            },
            getButtonChange2(value) {
                this.statisticsPeriod2 = value;
            },
            getButtonChange3(value) {
                this.statisticsPeriod3 = value;
            },
            getButtonChange4(value) {
                this.statisticsPeriod4 = value;
            },
            getButtonChange5(value) {
                this.statisticsPeriod5 = value;
            },
            getButtonChange6(value) {
                this.statisticsPeriod6 = value;
            },
            getButtonChange7(value) {
                this.statisticsPeriod7 = value;
            },
            getButtonChange8(value) {
                this.statisticsPeriod8 = value;
            },
            getButtonChange9(value) {
                this.statisticsPeriod9 = value;
            },
            getButtonChange10(value) {
                this.statisticsPeriod10 = value;
            },
            getButtonChange11(value) {
                this.statisticsPeriod11 = value;
            },
            getPatientId() {
				let patientId = this.patientId
            },

            onClickLeft() {
                window.location.href = './sdscaInfo.html'
            },
            onClickRight() {
                window.location.href = '../../index.html?userid=' + localStorage.pid
            },

            async postSdsca() {

                let inputs = [];
                for (let i in this.radios) {
                    inputs.push(this.radios[i]);

                }
                for (let k in inputs) {
                    if (inputs[k] == null) {
                        vant.Toast.fail('请填写所有选项!');
                    }
                    break
                }



                let url =
                    getUrl() + this.url.postSdsca;
				let patientId = this.patientId
                let params = {
                    // 患者 ID 从本地存储空间的 pid 获得
                    patientId: patientId,
                    answers: inputs

                };
                const res = await postAction(url, params);
                if (res.data.success) {
                    vant.Toast.success('3秒后查看结果');
                    // 定时跳转
					if(this.from){
						setTimeout("javascript:history.go( -1 )", 3000);
					}else{
						setTimeout("javascript:location.href='./sdscaInfo.html'", 3000);
					}
                }
            },
        },
        created() {
			if(url('?from')=='weapp'){
				this.from = 'weapp'
			}
			if(url('?pid')){
				this.patientId = url('?pid')
			}else{
				this.patientId = localStorage.pid;
			}
            var status = window.location.search.slice(8,9)
            if (status == 1) {
                let patientId=this.patientId
                let params = {
                    patientId: patientId
                }

                let url =
                    getUrl() + this.url.getSdscaInfo;
                getAction(url, params).then((res) => {
                    console.log(res.data.result.answers);
                    this.statisticsPeriod = res.data.result.answers[0],
                        this.statisticsPeriod1 = res.data.result.answers[1],
                        this.statisticsPeriod2 = res.data.result.answers[2],
                        this.statisticsPeriod3 = res.data.result.answers[3],
                        this.statisticsPeriod4 = res.data.result.answers[4],
                        this.statisticsPeriod5 = res.data.result.answers[5],
                        this.statisticsPeriod6 = res.data.result.answers[6],
                        this.statisticsPeriod7 = res.data.result.answers[7],
                        this.statisticsPeriod8 = res.data.result.answers[8],
                        this.statisticsPeriod9 = res.data.result.answers[9],
                        this.statisticsPeriod10 = res.data.result.answers[10],
                        this.statisticsPeriod11 = res.data.result.answers[11],
                        this.status = false


                })



            }
            this.getPatientId()
        },

    };

    const app = Vue.createApp(PatientData);

    app.use(vant);
    // 通过 CDN 引入时不会自动注册 Lazyload 组件
    // 可以通过下面的方式手动注册
    app.use(vant.Lazyload);

    // 调用函数组件，弹出一个 Toast
    // vant.Toast("刷新成功");
    app.mount("#app");
</script>

</html>
